package com.usian.admin.controller.v1;

import com.usian.admin.service.AdUserService;
import com.usian.api.AdUserControllerApi;
import com.usian.model.admin.dtos.AdUserDto;
import com.usian.model.common.dtos.ResponseResult;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RequestMapping("/admin/login")
@RestController
@Api(value = "用户登录",tags = "login",description = "登录API")
public class AdUserController implements AdUserControllerApi {

    @Autowired
    private AdUserService adUserService;

    @PostMapping("in")
    @Override
    public ResponseResult login(@RequestBody AdUserDto dto) {
        return adUserService.login(dto);
    }
}
